import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;

public class B127_2 {
	public static int iterator(int n) {
		final int none = 1;
		final int one = 1;
		int[] extend = new int[n + 1];
		
		extend[0] = none;
		extend[1] = one;
		
		for(int i = 2; i <= n; i++)
			extend[i] = extend[i - 1] + extend[i - 2];
		
		return extend[n];
	}
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input;
		int n;
		StringBuffer output = new StringBuffer();
		
		while((input = br.readLine()) != null) {
			n = Integer.parseInt(input);
			
			output.append(iterator(n) + "\n");
		}
		
		System.out.print(output);
	}
}